Repository navigation
refactor: Rename algorithm-selection arguments to algorithm and measure selection to measure - #2951
Open
schochastics wants to merge 22 commits into
Open
schochastics wants to merge 22 commits into
schochastics wants to merge 22 commits into
Conversation
…patch/` (#2934) Co-authored-by: Claude <noreply@anthropic.com>
…r's series loop does (#2935) Co-authored-by: Claude <noreply@anthropic.com>
…2936) Co-authored-by: Claude <noreply@anthropic.com>
…sure selection to `measure` `method` (isomorphism functions, `sample_tree()`, `sample_degseq()`, `realize_degseq()`, `realize_bipartite_degseq()`, `merge_coords()`), `impl` (`induced_subgraph()`), `implementation` (`cluster_spinglass()`, `fit_power_law()`) and `heuristic` (`greedy_vertex_coloring()`) become `algorithm`; `method` in `compare()` and `similarity()` becomes `measure`. Legacy names are recovered with a soft-deprecation. Closes #2932. Part of #2788. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 15, 2026
Open
Contributor
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 809e79f is merged into claude/issue-2788-subagents-faw1t1-13:
|
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
…ing's setup (#2949) Co-authored-by: Claude <noreply@anthropic.com>
…edit is vendored (#2956) Co-authored-by: Claude <noreply@anthropic.com>
… them (#2957) Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
…s fixes in front of the vendor commits (#2959) Co-authored-by: Claude <noreply@anthropic.com>
…-no-push-dev` (#2961) Co-authored-by: Claude <noreply@anthropic.com>
… upstream function (#2966) Co-authored-by: Claude <noreply@anthropic.com>
…s-land.sh --review --series` (#2970) Co-authored-by: Claude <noreply@anthropic.com>
#2967) Co-authored-by: Claude <noreply@anthropic.com>
…d input `igraph_match_arg()` eagerly computed `rlang::caller_arg()` and went through `rlang::arg_match()` on every call, costing ~19 us even when the value is valid. It now returns early for the two cases `arg_match()` accepts (the untouched default, or a single exact match) and only pays for the error machinery when it has to report one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2932. Part of #2788 (PR 14 of the stack, on top of #2950).
This implements the two-word proposal from #2932 (#2932 (comment)):
algorithmfor how something is computed,measurefor what is computed.What this does
→ algorithm:methodin the isomorphism family:isomorphic(),subgraph_isomorphic(),count_isomorphisms(),count_subgraph_isomorphisms(),isomorphisms(),subgraph_isomorphisms()(the aliasesis_isomorphic_to()andis_subgraph_isomorphic_to()follow)methodinsample_tree(),sample_degseq(),realize_degseq(),realize_bipartite_degseq(),merge_coords()implininduced_subgraph()implementationincluster_spinglass()andfit_power_law()heuristicingreedy_vertex_coloring()→ measure:methodincompare()(generic and itscommunities/membership/defaultmethods) andsimilarity()Unchanged by design:
layout_with_fr(grid)(an acceleration switch) andmake_clusters(algorithm)(a free-text label read back byalgorithm()). With this PR, no live exported function has amethodargument any more.How
sample_tree(),sample_degseq(),realize_degseq(),merge_coords(),induced_subgraph(),cluster_spinglass(),greedy_vertex_coloring(),similarity()): legacy names are recovered under the standard single soft-deprecation.fit_power_law(), plusrealize_bipartite_degseq()andcompare(), which have no registry entry: positional calls are unchanged and silent, and named legacy calls are caught by a trailingmethod/implementation=deprecated()sentinel. Forcompare()the sentinel and bridge live in the S3 methods, which must share the generic's formals, because a value reassigned in the generic does not reach the method....to the per-algorithm backends. An abbreviatedmeth =used to partial-match the head formal and now lands in....component_wise()→merge_coords()). Thesample_degseq()messages for retired values ("simple", …) now sayalgorithm =. Deprecated wrappers (graph.isomorphic(),similarity.jaccard(),degree.sequence.game(), …) are untouched; only their "please usesimilarity()with …" hints now namemeasure.Tests
There are
expect_legacy_arg()checks for every renamed function, including the spec twinstree()/degseq(), a positional call, and the conflict error for a function that uses a sentinel.The #2788 stack
Each PR is based on the previous one and merges in this order:
algotoalgorithminpage_rank(),feedback_arc_set()andfeedback_vertex_set()#2859:algo→algorithmnodestonin generators andcentr_*_tmax()#2860:nodes→n(vertex counts)cluster_infomap()#2861: weights argumentsnormalized#2862: normalization flags →normalizedverticesandvertex#2864: selectors →vertices/vertexedges#2943: edge selectors →edgesindextovertices/edgesin the attribute accessors #2944: attribute accessors:index→vertices/edgesn_iter/max_iter#2945: iterations →n_iter/max_iterMu→mu)algorithm/measure(Algorithm-selection argument names: census ofmethod/algorithm/algo/impl/implementation#2932)🤖 Generated with Claude Code